//
//  Light.h
//  CompGraf2
//
//  Created by Juan Niosi on 30/08/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <OpenGLES/ES1/gl.h>
#import <OpenGLES/ES1/glext.h>
#import <OpenGLES/ES2/gl.h>
#import <OpenGLES/ES2/glext.h>
#import "Engine.h"
#import "Entity.h"

@interface Light : Entity
{
    GLfloat *lightPos;
    GLfloat *diffuse;
    GLfloat *ambient;
    GLfloat *specular;
    GLfloat attenuation;
    GLenum  lightIndex;
    
    GLfloat spotAngle;
    GLfloat *spotDir;
    GLfloat spotExp;
    bool spotLight;
}
@property (nonatomic) GLfloat attenuation;
@property (nonatomic) GLfloat spotAngle;
@property (nonatomic) GLfloat spotExp;
@property (nonatomic) GLfloat *spotDir;
@property (nonatomic) GLenum lightIndex;

- (id)init:(GLenum)lightEnum;

- (id)initSpot:(GLenum)lightEnum setAngle:(float)angle;

- (void)setLightPos:(GLfloat *)pos;
- (GLfloat *)getLightPos;

- (void)setDiffuse:(GLfloat *)diffuse;
- (GLfloat *)getDiffuse;

- (void)setAmbient:(GLfloat *)diffuse;
- (GLfloat *)getAmbient;

- (void)setSpecular:(GLfloat *)diffuse;
- (GLfloat *)getSpecular;


@end
